﻿using CRedis.Client.Entities;
using CRedis.Client.Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RedisClientTest
{
    public class MyRedisServer:RedisServer
    {
        MyClientPool _myPool;
        private MyClientPool MyPool
        {
            get
            {
                if (this._myPool == null)
                {
                    this._myPool = new MyClientPool(this);
                }
                return this._myPool;
            }
        }
        public List<string> GetRandomItemFromSet(string key,int count)
        {
            return MyPool.Excute<List<string>>((MyRedisClient client) => client.GetRandomItemFromSet(key,count), "GetRandomItemFromSet");
        }
 
    }
}
